package com.etoc.test.util;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
	//private final static String DEFAULT_FORMAT = "yyyy-MM-dd HH:mm:ss";
	
	/**
	 * 
	 * 
	 * @param date
	 * @param pattern
	 * @return
	 * @see 
	 */
	public static String dateToStr(Date date, String pattern) {
		DateFormat dateFormat = new SimpleDateFormat(pattern);
		String str = dateFormat.format(date);
		return str;
	}
}
